    <?php
	$cod=$_POST['fcodpac'];
	$trat=$_POST['fcod'];
	$pago=$_POST['fforpag'];
	$nces=$_POST['fnumces'];
	$con= mysql_connect('localhost','root','');
	mysql_select_db('spa_medico');
	$sql=mysql_query("insert into contrata values('','$cod','$trat', $nces,'$pago',sysdate())");
	if(mysql_query($sql,$con))
	{
		echo "error";
	}
	else
	{
		echo "Reserva de Tratamiento Realizada";
	}
?>
